﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate;
using NHibernate.Tool.hbm2ddl;
using NHibernate.Cfg;
 using Frogism.Core;


namespace Frogism.Data._2 {
  public class NHConfig {
    private static ISessionFactory _sessionFactory;
    static NHConfig() {
      Configuration config = new Configuration();
      config.Configure();
      config.AddAssembly(typeof(Book).Assembly);
      _sessionFactory = config.BuildSessionFactory();
    }
    public static ISessionFactory GetSessionFactory() {
      return _sessionFactory;
    }
  }
}
